package 笔试.猿辅导;
/**
 * 猿辅导第一题
 * 交换数字的两个索引
 */
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class ChangeNum {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int index = 1;
        int pre = 0;
        List<Integer> list = new ArrayList<>();
        while (in.hasNextInt()) {
            int cur = in.nextInt();
            if(pre>cur){
                list.add(index);
            }
            if(list.size()==2){
                break;
            }
            index++;
            pre = cur;
        }
        System.out.print(list.get(0)-1);
        System.out.print(" ");
        System.out.print(list.get(1));

    }
}